import http from '../http.js'

// 获取某个问题
function getQuestion(qid){
	return http.get('/question/randomQuestion?qid='+qid)
}

// 获取问题的数量
function getQuestionNum(){
	return http.get('/question/getQuestionNum')
}

// 查询多少个问题按时间排序
function getNewQuestionList(start,end){
	return http.get('/question/getNewQuestionList?start='+start+'&end='+end)
}

// 获取热门问题的数量
function getHotQuestionNum(){
	return http.get('/question/getHotQuestionNum')
}

// 查询多少个问题按热度排序
function getHotQuestionList(start,end){
	return http.get('/question/getHotQuestionList?start='+start+'&end='+end)
}

// 获取未回答问题的数量
function getWaitQuestionNum(){
	return http.get('/question/getWaitQuestionNum')
}

// 查询多少个未回答问题按热度排序
function getWaitQuestionList(start,end){
	return http.get('/question/getWaitQuestionList?start='+start+'&end='+end)
}

// 查询多少个未回答问题按热度排序
function publishQuestion(data){
	return http.post('/question/publishQuestion',data)
}

export{
	getQuestion,
	getQuestionNum,
	getNewQuestionList,
	getHotQuestionNum,
	getHotQuestionList,
	getWaitQuestionNum,
	getWaitQuestionList,
	publishQuestion
}